const Admin = ()=>import('@/pages/Admin')
const Category = ()=>import('@/pages/Category')
const GoodsDetail = ()=>import('@/pages/GoodsDetail')
const Home = ()=>import('@/pages/Home')
const NeedBuy = ()=>import('@/pages/NeedBuy')
const Search = ()=>import('@/pages/Search')
const ShopCart = ()=>import('@/pages/ShopCart')
const RecommendDetail = ()=>import('@/pages/Category/RecommendDetail')
const Tui = () => import('@/pages/Home/routes/Tui')
const Life = () => import('@/pages/Home/routes/Life')
const Login = ()=> import('@/pages/Login')
const PhoneLogin = ()=> import('@/pages/PhoneLogin')
export default [
    {
        path: '',
        redirect: '/home',

    },
    {
        path:'/admin',
        component: Admin,
      
    },
    {
        path:'/category',
        component:Category,
    
    },
    {
        path: '/goodsdetail',
        component:GoodsDetail,
    
    },
    {
        path:'/home',
        component: Home,
        children: [
            {
                path: '/home',
                redirect: '/home/tuijian',

            },
            {
                path: "tuijian",
                component: Tui, 
            },
            {
                path: "life",
                component: Life,
                name: "life",
                query: {
                   categoryId:"id" 
                }

            }

        ]
        
        
    },
    {
        path:'/needbuy',
        component:NeedBuy,
    },
    {
        path:'/search',
        component:Search,
      
    },
    {
        path:'/shopcart',
        component:ShopCart,
        
    },
    {
        path:'/recommenddetail',
        component:RecommendDetail,
    },
    {
        path:'/login',
        component:Login,  
    },
    {
        path:'/phoneLogin',
        component:PhoneLogin,
        
    },
    {
        path:'/',
        redirect:'/home'
    }
]